﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Back.Xinkui.Common
{
    public class Pager
    {
        /// <summary>
        /// 每页展示条数
        /// </summary>
        public int PageSize
        { get; set; }

        /// <summary>
        /// 当前页码
        /// </summary>
        public int PageIndex
        { get; set; }

        /// <summary>
        /// 总记录数
        /// </summary>
        public int TotalCount
        { get; set; }

        /// <summary>
        /// 总页数
        /// </summary>
        public int TotalPage
        {
            get
            {
                return (int)Math.Ceiling(TotalCount / PageSize * 1.0m);
            }
        }
    }
}
